Example Object Def
The following is an example setup for an Object Def file to better demonstrate how to
put the above information into practice. Use the same format and fill in the appropriate
values given the information contained throughout the various documents to create a set of "Game Objects" for an HCGE game.
;;;;;;;;;;;;;;;;;;;;;;
; Example Object Def ;
;;;;;;;;;;;;;;;;;;;;;;
Sprite File: art/global.spr
Number of total Movement Funcs: 3
Number of Movement Func Files: 1
Movement Func File 0: objmv.def
;0- Scripted Movement Function 0
;1- Scripted Movement Function 1
;2- Scripted Movement Function 2
Number of total Projectile Collision Funcs: 0
Number of Projectile Collision Func Files: 0
Number of total Animation Funcs: 2
Number of Animation Func Files: 1
Animation Func File 0: objani.def
;0- Scripted Animation Function 0
;1- Scripted Animation Function 1
Number of total Debug Placement Funcs: 1
Number of Debug Placement Func Files: 1
Debug Placement Func File 0: objdp.def
;0- Scripted Debug Placement Function 0
Number of total Debug Drawing Funcs: 1
Number of Debug Drawing Func Files: 1
Debug Drawing Func File 0: objdd.def
;0- Scripted Debug Drawing Function 0
Number of Objects: 5
;;;;;;;;;;;
;If this Object Def were loaded as "Game-global" by a "Game Def", Entry 0 should be regarded as "invalid", and have no useful settings
;If this Object Def were loaded as "Zone-specific" by a "Zone Def", Entry 0 may contain a valid, useable Object Type entry
;;;;;;;;;;;
Obj 0- Blank Object
Drawing Priority: 0
Extra Variables: 0
Out Of Range Event: _Range_Freeze
Flags: 0
Movement Function: _OMove_None
Scrpt Movement Function: _Func_None
Drawing Function: _ODraw_None
Script Drawing Function: _Func_None
Collide Function: _OCol_None
Script Collide Function: _Func_None
PCollide Function: _OPCol_None
Scrpt PCollide Function: _Func_None
Debug P Function: _ODebugP_None
Script Debug P Function: _Func_None
Debug D Function: _ODebugD_None
Script Debug D Function: _Func_None
Spawn Values- None
Num Sprite Sets: 0
Num Animations: 0
Num Sounds: 0
Num Linked Objects: 0
Num Constant Lists: 0
Obj 1- Collectable Item Object, Saves
Drawing Priority: 30
Extra Variables: 0
Out Of Range Event: _Range_Freeze
Flags: S
Movement Function: _OMove_Animate
Scrpt Movement Function: _Func_None
Drawing Function: _ODraw_Animated
Script Drawing Function: _Func_None
Collide Function: _OCol_Item
Script Collide Function: _Func_None
PCollide Function: _OPCol_None
Scrpt PCollide Function: _Func_None
Debug P Function: _ODebugP_Standard
Script Debug P Function: _Func_None
Debug D Function: _ODebugD_FirstFrame
Script Debug D Function: _Func_None
Spawn Values- None
Num Sprite Sets: 1
Sprite 0- Set ID: G1 ;Game Sprite Set 1
Num Animations: 1
Ani 0- Animation ID: G0 ;Game Animation 0
Num Sounds: 1
Sound 0- Sound ID: G4 ;Game Sound Effect 4 (plays when the item is picked up
Num Linked Objects: 1
Object 0- Object ID: G2 ;Game Object 2 (spawns when the item is picked up)
Num Constant Lists: 1
List 0- Num Constants: 3
Constant 0: a8 ;User-created "Active Variable" 8
Constant 1: 1 ;Item increases variable by 1
Constant 2: 999 ;Variable should not excede 999
Obj 2- Path-Mobile Script-Driven Object That Has Custom Collision With the Player, Spawned By Another Object, Not By "Debug", Doesn't Save
Drawing Priority: 30
Extra Variables: 14
Out Of Range Event: _Range_Freeze
Flags: 0
Movement Function: _OMove_Floor_Normal
Scrpt Movement Function: G0 ;Game Scripted Object Movement Function 0
Drawing Function: _ODraw_Animated_Directional
Script Drawing Function: _Func_None
Collide Function: _OCol_None
Script Collide Function: G0 ;Game Scripted Object Collision Function 0
PCollide Function: _OPCol_None
Scrpt PCollide Function: _Func_None
Debug P Function: _ODebugP_None
Script Debug P Function: _Func_None
Debug D Function: _ODebugD_None
Script Debug D Function: _Func_None
Spawn Values- Value 0: *0 -Reserved 1 ;Obtain initial value from spawn parameter 0
Value 1: *1 -Reserved 2 ;Obtain initial value from spawn parameter 1
Value 2: 0 -XVel
Value 3: 0 -YVel
Value 4: 0 -XCount
Value 5: 0 -YCount
Value 6: 0 -XAccel
Value 7: 0 -YAccel
Value 8: R12 -Layer ;Obtain initial value from User Register 12 when spawned
Value 9: 0 -EdgePause
Value 10: 4 -SlopeTolerance
Value 11: 8 -DropTolerance
Value 12: 8 -RiseTolerance
Num Sprite Sets: 1
Sprite 0- Set ID: G2 ;Game Sprite Set 2
Num Animations: 2
Ani 0- Animation ID: G1 ;Game Animation 1
Ani 1- Animation ID: G1 ;Game Animation 2
Num Sounds: 0
Num Linked Objects: 0
Num Constant Lists: 0
Obj 3- Vertical PlaneSwitch Left to Plane 2, Right to Plane 3, Player must be on path for change to take effect, Saves
Drawing Priority: 30
Extra Variables: 0
Out Of Range Event: _Range_Freeze
Flags: S
Movement Function: _OMove_None
Scrpt Movement Function: _Func_None
Drawing Function: _ODraw_PlaneSwitchV
Script Drawing Function: _Func_None
Collide Function: _OCol_PlaneSwitchV
Script Collide Function: _Func_None
PCollide Function: _OPCol_None
Scrpt PCollide Function: _Func_None
Debug P Function: _ODebugP_Standard
Script Debug P Function: _Func_None
Debug D Function: _ODebugD_PlaneSwitchV
Script Debug D Function: _Func_None
Spawn Values- None
Num Sprite Sets: 1
Sprite 0- Set ID: G1 ;Game Sprites Set 1
Num Animations: 0
Num Sounds: 0
Num Linked Objects: 0
Num Constant Lists: 1
List 0- Num Constants: 3
Constant 0: 3 ;Plane ID ->
Constant 1: 2 ;Plane ID <-
Constant 2: 0 ;Must be on path
Obj 4- 4x4 Tiled Path Object That Moves Through Freespace (No Level Collision), Doesn't Save, Destroyed When out of "Activity Range"
Drawing Priority: 90
Extra Variables: 15
Out Of Range Event: _Range_Destroy
Flags: 0
Movement Function: _OMove_Normal
Scrpt Movement Function: _Func_None
Drawing Function: _ODraw_Tiled
Script Drawing Function: _Func_None
Collide Function: _OCol_Tiled
Script Collide Function: _Func_None
PCollide Function: _OPCol_None
Scrpt PCollide Function: _Func_None
Debug P Function: _ODebugP_Standard
Script Debug P Function: _Func_None
Debug D Function: _ODebugD_Tiled
Script Debug D Function: _Func_None
Spawn Values- Value 0: 8 -Plat Start ;Tile Map Data starts at "Extra Variable" 8
Value 1: 0 -Reserved 2
Value 2: 0 -X Vel ;"Extra Variables" 2-7 are being used by standard freespace movement
Value 3: 0 -Y Vel
Value 4: 0 -X Count
Value 5: 0 -Y Count
Value 6: 0 -X Accel
Value 7: $32 -Y Accel
Width: 2 -Width ;Tile Map Data, begins with Height, Width, and Plane ID properties, then Map Layout Data
Height: 2 -Height
Plane: 0 -Plane
TileID 0: 12 -Tile ID 0, 0
TileID 1: 13 -Tile ID 1, 0
TileID 2: 14 -Tile ID 0, 1
TileID 3: 15 -Tile ID 1, 1
Num Sprite Sets: 0
Num Animations: 0
Num Sounds: 0
Num Linked Objects: 0
Num Constant Lists: 0